#include <QApplication>
#include <QTranslator>
#include <QDebug>
#include <QStyleFactory>

#include "dialogimpl.h"
//
int main(int argc, char ** argv)
{
	QApplication app( argc, argv );
	
	app.setStyle(QStyleFactory::create("fusion"));
	 
	QPalette palette;
	palette.setColor(QPalette::Window, QColor(53,53,53));
	palette.setColor(QPalette::WindowText, Qt::white);
	palette.setColor(QPalette::Base, QColor(15,15,15));
	palette.setColor(QPalette::AlternateBase, QColor(53,53,53));
	palette.setColor(QPalette::ToolTipBase, Qt::white);
	palette.setColor(QPalette::ToolTipText, Qt::white);
	palette.setColor(QPalette::Text, Qt::white);
	palette.setColor(QPalette::Button, QColor(53,53,53));
	palette.setColor(QPalette::ButtonText, Qt::white);
	palette.setColor(QPalette::BrightText, Qt::red);
	 
	palette.setColor(QPalette::Highlight, QColor(142,45,197));
	//palette.setColor(QPalette::Highlight, QColor(142,45,197).lighter());
	palette.setColor(QPalette::HighlightedText, Qt::black);
	app.setPalette(palette);
	
	
	QTranslator translator;
	QString locale = QLocale::system().name();
	qDebug() << "Systemsprache" << locale;
	translator.load(QString("../sprache/lang_") + locale);
	app.installTranslator(&translator);
	DialogImpl win;
	win.show(); 
	app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
	return app.exec();
}
